package com.example.fanday.play.base;

import android.app.Application;

import com.example.fanday.play.di.component.ApplicationComponent;
import com.example.fanday.play.di.component.DaggerApplicationComponent;
import com.example.fanday.play.di.module.ApplicationMudule;

/**
 * Created by fanday on 2017/8/12.
 */

public class BaseApplication extends Application {

    private ApplicationComponent applicationComponent;
    @Override
    public void onCreate() {
        super.onCreate();
        initApplicationComponent();
    }

    private void initApplicationComponent() {
        applicationComponent = DaggerApplicationComponent.builder().
                applicationMudule(new ApplicationMudule(this)).
                build();
    }

    public ApplicationComponent getApplicationComponent(){
        return applicationComponent;
    }
}
